#include <Arduino.h>

// put function declarations here:
int data_pin = A0;

void setup()
{
  // put your setup code here, to run once:
  pinMode(data_pin, INPUT);
  Serial.begin(9600);
}

void loop()
{
  // put your main code here, to run repeatedly:
  int data_val = analogRead(data_pin);
  Serial.print("data:");
  Serial.print(data_val);
  Serial.print(", ");

  if (data_val <= 5)
  {
    Serial.println("no water");
  }
  else if (data_val <= 380)
  {
    Serial.println("water < 5mm");
  }
  else if (data_val <= 450)
  {
    // 5ml,410
    Serial.println("water:5mm");
  }
  else if (data_val <= 490)
  {
    // 10ml,473
    Serial.println("water:10mm");
  }
  else if (data_val <= 540)
  {
    // 25ml,507
    Serial.println("water:15mm");
  }
  else
  {
    Serial.println("water > 15mm");
  }

  delay(1000);
}

// put function definitions here: